<div class="col-sm-12">
    <div class="box">
        <!-- BOX-BODY -->
        <div class="box-body">
            <div id="datatable1_wrapper" class="dataTables_wrapper form-inline" role="grid">
                <div class="row">
                    <div class="col-sm-9 ">
                        <div class="col-sm-5 nopadding-left">
                            <div class="pull-left">
                                <div class="input-group bottom8">
                                    {{input class="form-control" type="text" placeholder="搜索申请人/床位号" value=queryCondition enter="search"}}
                                    <span class="input-group-btn">
                  <button class="btn btn-primary btn-reduce" type="button" style="touch-action: manipulation; -ms-touch-action: manipulation;" {{action "search" on="click"}}>
                    <i class="fa fa-search"></i>
                  </button>
                </span>
                                </div>
                            </div>
                            <!--搜索-->
                        </div>
                        <div class="col-sm-7 nopadding-right nopadding-left">
                            {{callbusi/time-search class="inline-block" text='按创建日期搜索' dateShow=dateShow chooseDate=chooseDate search="search"
                              submmit="submmit" emptied='emptied' changeBeginDateAction='changeBeginDateAction' changeEndDateAction='changeEndDateAction'}}
                        </div>
                    </div>
                    <div class="user-add-btn col-sm-3 pull-right nopadding-right">
                        {{#ui/mix-button class=" user-btn pull-right" iconClass="fa-plus" text='新增变更申请' clickAction="toDetailPage" toDetailPage="toDetailPage" }}
                        {{/ui/mix-button}}
                    </div>
                </div>
                        <table id="datatable1" cellpadding="0" cellspacing="0" border="0" class="datatable table table-bordered table-hover dataTable mt15" aria-describedby="datatable1_info">
                            <thead>
                                <tr role="row">
                                    <th class="center" rowspan="1" colspan="1" width="">创建日期</th>
                                    <th class="center" rowspan="1" colspan="1" width="">申请人</th>
                                    <th class="center" rowspan="1" colspan="1" width="">变更内容</th>
                                    <th class="center" rowspan="1" colspan="1" class="" width="">变更状态</th>
                                </tr>
                            </thead>
                            {{#if changeList}}
                            <tbody role="alert" aria-live="polite" aria-relevant="all" class="">
                                {{#each changeList as |change|}}
                                    <tr class="gradeA odd" {{action "toDetailPage" change on="click"}}>
                                        <td class=" ellipsis center sorting_1" style="vertical-align:middle">{{change.createDateString}}</td>
                                        <td class=" ellipsis center" style="vertical-align:middle">{{change.customer.name}}</td>
                                        <td class=" ellipsis ">
                                          {{#if change.statusChange}}
                                            <div>入住状态：
                                              {{#if change.customerStatusOld.typename}}
                                              由{{change.customerStatusOld.typename}}
                                              {{/if}}
                                              变更为{{change.customerStatus.typename}}
                                            </div>
                                          {{/if}}
                                          {{#if change.newFlowFlag}}
                                            <div>入住状态：变更为{{change.customerStatus.typename}}</div>
                                            <div>结算类型：变更为{{change.chargeType.typename}}</div>
                                          {{/if}}
                                          {{#if change.chargeTypeChange}}
                                            <div>结算类型：
                                              {{#if change.chargeTypeOld.typename}}
                                              由{{change.chargeTypeOld.typename}}
                                              {{/if}}
                                              变更为{{change.chargeType.typename}}
                                            </div>
                                          {{/if}}
                                          {{#if change.bedChange}}
                                              <div>床位：
                                                {{#if change.chargeTypeChange}}
                                                  {{#if change.bedOld.allBedName}}
                                                  由{{change.bedOld.allBedName}}({{change.bedPriceOld}}元/天)
                                                  {{/if}}
                                                  {{#if change.chargeTypeYFlag}}
                                                  变更为{{change.bedNew.allBedName}}({{change.bedPriceNew}}元/月)
                                                  {{else}}
                                                  变更为{{change.bedNew.allBedName}}({{change.bedPriceNew}}元/天)
                                                  {{/if}}
                                                {{else}}
                                                  {{#if change.bedOld.allBedName}}
                                                  由{{change.bedOld.allBedName}}({{change.bedPriceOld}}元/月)
                                                  {{/if}}
                                                  {{#if change.chargeTypeYFlag}}
                                                  变更为{{change.bedNew.allBedName}}({{change.bedPriceNew}}元/月)
                                                  {{else}}
                                                  变更为{{change.bedNew.allBedName}}({{change.bedPriceNew}}元/天)
                                                  {{/if}}
                                                {{/if}}
                                              </div>
                                          {{/if}}
                                          {{#if change.foodChange}}
                                              <div>餐饮等级：
                                                {{#if change.chargeTypeChange}}
                                                  {{#if change.foodLevelOld.typename}}
                                                  由{{change.foodLevelOld.typename}}({{change.foodPriceOld}}元/天)
                                                  {{/if}}
                                                  {{#if change.chargeTypeYFlag}}
                                                  变更为{{change.foodLevelNew.typename}}({{change.foodPriceNew}}元/月)
                                                  {{else}}
                                                  变更为{{change.foodLevelNew.typename}}({{change.foodPriceNew}}元/天)
                                                  {{/if}}
                                                {{else}}
                                                  {{#if change.foodLevelOld.typename}}
                                                  由{{change.foodLevelOld.typename}}({{change.foodPriceOld}}元/月)
                                                  {{/if}}
                                                  {{#if change.chargeTypeYFlag}}
                                                  变更为{{change.foodLevelNew.typename}}({{change.foodPriceNew}}元/月)
                                                  {{else}}
                                                  变更为{{change.foodLevelNew.typename}}({{change.foodPriceNew}}元/天)
                                                  {{/if}}
                                                {{/if}}
                                              </div>
                                          {{/if}}
                                          {{#if change.levelChange}}
                                              <div>护理等级：
                                                {{#if change.chargeTypeChange}}
                                                  {{#if change.nursingLevelOld.name}}
                                                  由{{change.nursingLevelOld.name}}({{change.projectPriceOld}}元/天)
                                                  {{/if}}
                                                    {{#if change.chargeTypeYFlag}}
                                                      变更为{{change.nursingLevelNew.name}}({{change.projectPriceNew}}元/月)
                                                    {{else}}
                                                      变更为{{change.nursingLevelNew.name}}({{change.projectPriceNew}}元/天)
                                                    {{/if}}
                                                {{else}}
                                                  {{#if change.nursingLevelOld.name}}
                                                  由{{change.nursingLevelOld.name}}({{change.projectPriceOld}}元/月)
                                                  {{/if}}
                                                  {{#if change.chargeTypeYFlag}}
                                                    变更为{{change.nursingLevelNew.name}}({{change.projectPriceNew}}元/月)
                                                  {{else}}
                                                    变更为{{change.nursingLevelNew.name}}({{change.projectPriceNew}}元/天)
                                                  {{/if}}
                                                {{/if}}
                                              </div>
                                          {{/if}}
                                          {{#if change.priceChange}}
                                            <div>总价格：
                                              {{#if change.chargeTypeChange}}
                                                {{#if change.priceOld}}
                                                由{{change.priceOld}}(元/天)
                                                {{/if}}
                                                {{#if change.chargeTypeYFlag}}
                                                  变更为{{change.priceNew}}(元/月)
                                                {{else}}
                                                  变更为{{change.priceNew}}(元/天)
                                                {{/if}}
                                              {{else}}
                                                {{#if change.priceOld}}
                                                由{{change.priceOld}}(元/月)
                                                {{/if}}
                                                  {{#if change.chargeTypeYFlag}}
                                                    变更为{{change.priceNew}}(元/月)
                                                  {{else}}
                                                    变更为{{change.priceNew}}(元/天)
                                                  {{/if}}
                                                {{/if}}
                                            </div>
                                          {{/if}}
                                          {{#if change.contractEndDateChange}}
                                            <div>合同截止时间：
                                              {{#if change.chargeTypeChange}}
                                                {{#if change.contractEndDateOld}}
                                                由{{change.contractEndDateOldString}}
                                                {{/if}}
                                                {{#if change.chargeTypeYFlag}}
                                                  变更为{{change.contractEndDateNewString}}
                                                {{else}}
                                                  变更为{{change.contractEndDateNewString}}
                                                {{/if}}
                                              {{else}}
                                                {{#if change.contractEndDateOld}}
                                                由{{change.contractEndDateOldString}}
                                                {{/if}}
                                                  {{#if change.chargeTypeYFlag}}
                                                    变更为{{change.contractEndDateNewString}}
                                                  {{else}}
                                                    变更为{{change.contractEndDateNewString}}
                                                  {{/if}}
                                                {{/if}}
                                            </div>
                                          {{/if}}
                                        </td>
                                        <td class=" ellipsis " style="vertical-align:middle">{{{change.status.typename}}}</td>
                                    </tr>
                                {{/each}}
                            </tbody>
                            {{else}}
                            {{/if}}
                        </table>
                        {{#if changeList }}
                            {{page-numbers content=changeList showFL=true numPagesToShow=3}}
                        {{else}}
                            <h1 class="col-sm-12 center unTask"></h1>
                        {{/if}}


            </div>
        </div>
    </div>
</div>
